Optimal. Leaf size=643 \[ \frac {a^{3/4} \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{3 \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}+\frac {1}{3} \tan (x) \sqrt {a+b \tan ^4(x)}-\frac {1}{2} \sqrt {a+b} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )-\frac {\sqrt {b} \tan (x) \sqrt {a+b \tan ^4(x)}}{\sqrt {a}+\sqrt {b} \tan ^2(x)}+\frac {\sqrt [4]{b} (a+b) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{2 \sqrt [4]{a} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt {a+b \tan ^4(x)}}-\frac {\sqrt [4]{b} \left (\sqrt {a}-\sqrt {b}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{2 \sqrt [4]{a} \sqrt {a+b \tan ^4(x)}}+\frac {\sqrt [4]{a} \sqrt [4]{b} \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} E\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{\sqrt {a+b \tan ^4(x)}}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \Pi \left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}};2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt {a+b \tan ^4(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.50, antiderivative size = 643, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 9, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.529, Rules used = {3670, 1336, 195, 220, 1209, 1198, 1196, 1217, 1707} \[ \frac {a^{3/4} \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{3 \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}-\frac {1}{2} \sqrt {a+b} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )+\frac {1}{3} \tan (x) \sqrt {a+b \tan ^4(x)}-\frac {\sqrt {b} \tan (x) \sqrt {a+b \tan ^4(x)}}{\sqrt {a}+\sqrt {b} \tan ^2(x)}+\frac {\sqrt [4]{b} (a+b) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{2 \sqrt [4]{a} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt {a+b \tan ^4(x)}}-\frac {\sqrt [4]{b} \left (\sqrt {a}-\sqrt {b}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{2 \sqrt [4]{a} \sqrt {a+b \tan ^4(x)}}+\frac {\sqrt [4]{a} \sqrt [4]{b} \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} E\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{\sqrt {a+b \tan ^4(x)}}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}} \Pi \left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}};2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right )}{4 \sqrt [4]{a} \sqrt [4]{b} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt {a+b \tan ^4(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 195
Rule 220
Rule 1196
Rule 1198
Rule 1209
Rule 1217
Rule 1336
Rule 1707
Rule 3670
Rubi steps
\begin {align*} \int \tan ^2(x) \sqrt {a+b \tan ^4(x)} \, dx &=\operatorname {Subst}\left (\int \frac {x^2 \sqrt {a+b x^4}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\operatorname {Subst}\left (\int \left (\sqrt {a+b x^4}-\frac {\sqrt {a+b x^4}}{1+x^2}\right ) \, dx,x,\tan (x)\right )\\ &=\operatorname {Subst}\left (\int \sqrt {a+b x^4} \, dx,x,\tan (x)\right )-\operatorname {Subst}\left (\int \frac {\sqrt {a+b x^4}}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac {1}{3} \tan (x) \sqrt {a+b \tan ^4(x)}+\frac {1}{3} (2 a) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a+b x^4}} \, dx,x,\tan (x)\right )-(a+b) \operatorname {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b x^4}} \, dx,x,\tan (x)\right )+\operatorname {Subst}\left (\int \frac {b-b x^2}{\sqrt {a+b x^4}} \, dx,x,\tan (x)\right )\\ &=\frac {1}{3} \tan (x) \sqrt {a+b \tan ^4(x)}+\frac {a^{3/4} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{3 \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}+\left (\sqrt {a} \sqrt {b}\right ) \operatorname {Subst}\left (\int \frac {1-\frac {\sqrt {b} x^2}{\sqrt {a}}}{\sqrt {a+b x^4}} \, dx,x,\tan (x)\right )-\left (\left (\sqrt {a}-\sqrt {b}\right ) \sqrt {b}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a+b x^4}} \, dx,x,\tan (x)\right )-\frac {\left (\sqrt {a} (a+b)\right ) \operatorname {Subst}\left (\int \frac {1+\frac {\sqrt {b} x^2}{\sqrt {a}}}{\left (1+x^2\right ) \sqrt {a+b x^4}} \, dx,x,\tan (x)\right )}{\sqrt {a}-\sqrt {b}}+\frac {\left (\sqrt {b} (a+b)\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a+b x^4}} \, dx,x,\tan (x)\right )}{\sqrt {a}-\sqrt {b}}\\ &=-\frac {1}{2} \sqrt {a+b} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a+b \tan ^4(x)}}\right )+\frac {1}{3} \tan (x) \sqrt {a+b \tan ^4(x)}-\frac {\sqrt {b} \tan (x) \sqrt {a+b \tan ^4(x)}}{\sqrt {a}+\sqrt {b} \tan ^2(x)}+\frac {\sqrt [4]{a} \sqrt [4]{b} E\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{\sqrt {a+b \tan ^4(x)}}+\frac {a^{3/4} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{3 \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}-\frac {\left (\sqrt {a}-\sqrt {b}\right ) \sqrt [4]{b} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{2 \sqrt [4]{a} \sqrt {a+b \tan ^4(x)}}+\frac {\sqrt [4]{b} (a+b) F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{2 \sqrt [4]{a} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt {a+b \tan ^4(x)}}-\frac {\left (\sqrt {a}+\sqrt {b}\right ) (a+b) \Pi \left (-\frac {\left (\sqrt {a}-\sqrt {b}\right )^2}{4 \sqrt {a} \sqrt {b}};2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \tan (x)}{\sqrt [4]{a}}\right )|\frac {1}{2}\right ) \left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right ) \sqrt {\frac {a+b \tan ^4(x)}{\left (\sqrt {a}+\sqrt {b} \tan ^2(x)\right )^2}}}{4 \sqrt [4]{a} \left (\sqrt {a}-\sqrt {b}\right ) \sqrt [4]{b} \sqrt {a+b \tan ^4(x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 17.88, size = 550, normalized size = 0.86 \[ \left (\frac {\tan (x)}{3}-\frac {1}{2} \sin (2 x)\right ) \sqrt {\frac {4 a \cos (2 x)+a \cos (4 x)+3 a-4 b \cos (2 x)+b \cos (4 x)+3 b}{4 \cos (2 x)+\cos (4 x)+3}}+\frac {3 b \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan ^5(x)+3 a \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)+\left (3 \sqrt {a} \sqrt {b}-2 i a-3 i b\right ) \left (\tan ^2(x)+1\right ) \sqrt {\frac {b \tan ^4(x)}{a}+1} F\left (\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )-3 \sqrt {a} \sqrt {b} \left (\tan ^2(x)+1\right ) \sqrt {\frac {b \tan ^4(x)}{a}+1} E\left (\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )+3 i a \sqrt {\frac {b \tan ^4(x)}{a}+1} \Pi \left (-\frac {i \sqrt {a}}{\sqrt {b}};\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )+3 i b \sqrt {\frac {b \tan ^4(x)}{a}+1} \Pi \left (-\frac {i \sqrt {a}}{\sqrt {b}};\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )+3 i a \tan ^2(x) \sqrt {\frac {b \tan ^4(x)}{a}+1} \Pi \left (-\frac {i \sqrt {a}}{\sqrt {b}};\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )+3 i b \tan ^2(x) \sqrt {\frac {b \tan ^4(x)}{a}+1} \Pi \left (-\frac {i \sqrt {a}}{\sqrt {b}};\left .i \sinh ^{-1}\left (\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \tan (x)\right )\right |-1\right )}{3 \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}} \left (\tan ^2(x)+1\right ) \sqrt {a+b \tan ^4(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 38.64, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\sqrt {b \tan \relax (x)^{4} + a} \tan \relax (x)^{2}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b \tan \relax (x)^{4} + a} \tan \relax (x)^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.23, size = 537, normalized size = 0.84 \[ \frac {\sqrt {a +b \left (\tan ^{4}\relax (x )\right )}\, \tan \relax (x )}{3}+\frac {2 a \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticF \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{3 \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}}+\frac {b \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticF \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}}-\frac {i \sqrt {b}\, \sqrt {a}\, \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticF \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}}+\frac {i \sqrt {b}\, \sqrt {a}\, \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticE \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, i\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}}-\frac {a \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticPi \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, \frac {i \sqrt {a}}{\sqrt {b}}, \frac {\sqrt {-\frac {i \sqrt {b}}{\sqrt {a}}}}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}}\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}}-\frac {b \sqrt {1-\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \sqrt {1+\frac {i \sqrt {b}\, \left (\tan ^{2}\relax (x )\right )}{\sqrt {a}}}\, \EllipticPi \left (\tan \relax (x ) \sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}, \frac {i \sqrt {a}}{\sqrt {b}}, \frac {\sqrt {-\frac {i \sqrt {b}}{\sqrt {a}}}}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}}\right )}{\sqrt {\frac {i \sqrt {b}}{\sqrt {a}}}\, \sqrt {a +b \left (\tan ^{4}\relax (x )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b \tan \relax (x)^{4} + a} \tan \relax (x)^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int {\mathrm {tan}\relax (x)}^2\,\sqrt {b\,{\mathrm {tan}\relax (x)}^4+a} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a + b \tan ^{4}{\relax (x )}} \tan ^{2}{\relax (x )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________